﻿''' <summary>
''' This class defines the interface that must implemented by all report writers.
''' </summary>
''' <remarks>
''' The methods implemented by each writer are called in sequence. The desired
''' output is outlined below:
''' 
'''              [Report Title]
'''              [System name]
'''            [Reporter version]
''' 
''' [Category]
'''    [Section]
'''        [Entry ID]  [Entry Value]
'''        [Entry ID]  [Entry Value]
'''        [Entry ID]  [Entry Value]
'''         .........
'''         .........
'''    [Section]
'''        [Entry ID]  [Entry Value]
'''         .........
'''         .........
''' [Category]
'''    [Section]
'''         .........
'''         .........
''' 
'''             [Report footer]
''' </remarks>
Public Interface IWriter

    ''' <summary>
    ''' Called during writer initialization.
    ''' </summary>
    ''' <param name="cfgFile">File name of writer configuration file.</param>
    ''' <remarks></remarks>
    Sub Startup(ByVal cfgFile As String)

    ''' <summary>
    ''' Called to output the report title.
    ''' </summary>
    ''' <param name="str">Report title.</param>
    ''' <remarks></remarks>
    Sub WriteTitle(ByVal str As String)

    ''' <summary>
    ''' Called to output the name of the system being audited.
    ''' </summary>
    ''' <param name="str">System name.</param>
    ''' <remarks></remarks>
    Sub WriteSystem(ByVal str As String)

    ''' <summary>
    ''' Called to output the version of the system info reporter executable.
    ''' </summary>
    ''' <param name="str">Version of system info reporter.</param>
    ''' <remarks></remarks>
    Sub WriteVersion(ByVal str As String)

    ''' <summary>
    ''' Called to output a category.
    ''' </summary>
    ''' <param name="str">Category name.</param>
    ''' <remarks></remarks>
    Sub WriteCategory(ByVal str As String)

    ''' <summary>
    ''' Called to output a section.
    ''' </summary>
    ''' <param name="str">Section name.</param>
    ''' <remarks></remarks>
    Sub WriteSection(ByVal str As String)

    ''' <summary>
    ''' Called to output an entry.
    ''' </summary>
    ''' <param name="id">Entry id.</param>
    ''' <param name="value">Entry value.</param>
    ''' <remarks></remarks>
    Sub WriteEntry(ByVal id As String, ByVal value As String)

    ''' <summary>
    ''' Called to output an entry without a value.
    ''' </summary>
    ''' <param name="str">Entry id.</param>
    ''' <remarks>This is typically called when information about an entry
    ''' could not be retrieved, without that meaning that there was an error.</remarks>
    Sub WriteEntry(ByVal str As String)

    ''' <summary>
    ''' Called to output a blank entry.
    ''' </summary>
    ''' <remarks></remarks>
    Sub WriteBlankEntry()

    ''' <summary>
    ''' Called to output a blank line.
    ''' </summary>
    ''' <remarks></remarks>
    Sub WriteBlank()

    ''' <summary>
    ''' Called to output an error that has occurred when collecting
    ''' information about an entry.
    ''' </summary>
    ''' <param name="str">Entry error.</param>
    ''' <remarks></remarks>
    Sub WriteEntryError(ByVal str As String)

    ''' <summary>
    ''' Called to output an error that has occurred when collecting
    ''' information about a section.
    ''' </summary>
    ''' <param name="str"></param>
    ''' <remarks></remarks>
    Sub WriteSectionError(ByVal str As String)

    ''' <summary>
    ''' Called to output an error that has occurred when collecting
    ''' information about a category.
    ''' </summary>
    ''' <param name="str">Category error.</param>
    ''' <remarks></remarks>
    Sub WriteCategoryError(ByVal str As String)

    ''' <summary>
    ''' Called to output a page break.
    ''' </summary>
    ''' <remarks></remarks>
    Sub WritePageBreak()

    ''' <summary>
    ''' Called to output the report footer.
    ''' </summary>
    ''' <remarks></remarks>
    Sub WriteFooter()

    ''' <summary>
    ''' Called to signal the writer to cleanup its resources.
    ''' </summary>
    ''' <remarks></remarks>
    Sub Cleanup()

    ''' <summary>
    ''' Returns the file used for output (nothing if not relevant).
    ''' </summary>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Function GetOutputFile() As String

End Interface
